<template>
  <view class="wai">
    <view class="">
      <image class="image" :src="image" mode=""></image>
    </view>
    <view class="tit">{{ tit }}</view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      id: '', //传过来的id
      image: '', //图片
      tit: '' //标题
    };
  },
  onLoad(options) {
    this.id = options.ids;
    console.log(this.id);
  },
  mounted() {
    var that = this;
    uni.request({
      url: that.app.apiHost + '/getAd',
      data: { ids: this.id },
      header: { Authorization: '' },
      success: (res) => {
        this.tit = res.data.data.title;
        this.image = res.data.data.full_image;
        console.log(res.data.data);
      }
    });
  },
  methods: {}
};
</script>

<style lang="scss" scoped>
.wai {
  .image {
    width: 100%;
    height: 50vh;
  }
  .tit {
    margin-top: 30rpx;
    text-align: center;
  }
  padding: 30rpx;
}
</style>
